home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / INTERRUP.SWG / 0004_ISRINFO.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  654b  |  36 lines

  1. {
  2. SEAN PALMER
  3.  
  4. > Does anyone know how to Write an ISR (interrupt service routine) that will
  5. > continue With the interrupt afterwards. EX: if you Write an ISR that traps
  6. > the mouse Int 33h but let the mouse still operate.
  7.  
  8. Try:
  9. }
  10.  
  11. Var
  12.   oldMouseHook : Procedure;
  13.  
  14. Procedure mouseHook(AX,BX,CX,DX,SI,DI,DS,ES,BP); interrupt;
  15. begin
  16.  
  17.  {Your stuff goes here}
  18.  {make sure it doesn't take TOO long!}
  19.  
  20.  Asm
  21.    pushF;
  22.  end;          {simulate an interrupt}
  23.  
  24.  oldMouseHook; {call old handler}
  25. end;
  26.  
  27. { to install: }
  28.  
  29.  getIntVec($33,@oldMouseHook);
  30.  setIntVec($33,@mouseHook);
  31.  
  32. { to deinstall: }
  33.  
  34.  setIntVec($33,@oldMouseHook);
  35.  
  36.